<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<%
    request.setAttribute("contextPath", request.getContextPath());
    
%>
<head>
<title>showContactDetail</title>
</head>
<body>
    <table width="80%" border="1" align="center">
		 
		<tr>
			<td>province</td>
			<td>city</td>
			<td>road</td>
			<td>suburb</td>
			<td>contactPerson</td>
			<td>phoneNumber</td>
		    <td>是否为默认地址</td>
			<td>操作</td>
		</tr>
		<c:forEach items="${contactDetails}" var="u">
			<tr>
				<td>${u.province }</td>
				<td>${u.city }</td>
				<td>${u.road }</td>
				<td>${u.suburb }</td>
				<td>${u.contactPerson}</td>
				<td>${u.phoneNumber }</td>
				<td>${u.isDefault }</td>
				<td>
				    <a href="${contextPath }/profile/updateContactDetail/${u.shoppingContactId }">编辑</a>
				    &nbsp;
				    <a href="${contextPath }/profile/deleteContactDetail/${u.shoppingContactId }/${u.userId}">删除</a>
				    &nbsp;
				    <a href="${contextPath }/profile/setDefaultContactDetail/${u.shoppingContactId}/${u.userId}">设为默认地址</a>
				    
				    
				</td>
			</tr>
        
        </c:forEach>
    </table>
    <br>
    <br>
    
    <a href="${contextPath}/profile/addContactDetail/1"><div align="center" style="color:#F00">添加配送信息</div></a><br><br>
    <a href="${contextPath }/profile/index"><div align="center" style="color:#F00">返回首页</div></a>
     
</body>
</html>